package com.klun.lianbiao;

import static com.klun.lianbiao.Node.genList;

public class lianbiao {

    /* 链表的翻转 */
    public static Node revert(Node head){
        Node a = head.next;
        Node b = head;
        Node c = null;
        head.next = null;
        while (a.hasNext()){
            c = a.next;
            a.next = b;
            b = a;
            a = c;
        }
        return b;
    }

    /**
     * 链表排序合并
     */
    public static Node sortAndHert(Node a,Node b){

        return null;
    }




    public static void main(String[] args) {
        Node node = genList();
        Node revert = revert(node);
        System.out.println("完成");
    }
}
